<?php

namespace backend\models\odm;

use Yii;

/**
 * This is the model class for table "xs_novel_chapter".
 *
 * @property string $chapter_id
 * @property integer $chapter_cid
 * @property string $chapter_novel_id
 * @property string $chapter_name
 * @property integer $chapter_isvip
 * @property integer $chapter_ispay
 * @property integer $chapter_istxt
 * @property integer $chapter_order
 * @property string $chapter_create_time
 * @property string $chapter_update_time
 */
class NovelChapterOdm extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'xs_novel_chapter';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['chapter_cid', 'chapter_novel_id', 'chapter_isvip', 'chapter_ispay', 'chapter_istxt', 'chapter_order'], 'integer'],
            [['chapter_novel_id'], 'required'],
            [['chapter_create_time', 'chapter_update_time'], 'safe'],
            [['chapter_name'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'chapter_id' => Yii::t('app', '章节id'),
            'chapter_cid' => Yii::t('app', '内容id'),
            'chapter_novel_id' => Yii::t('app', '小说id'),
            'chapter_name' => Yii::t('app', '章节名'),
            'chapter_isvip' => Yii::t('app', '是否需要会员,0为不需要'),
            'chapter_ispay' => Yii::t('app', '是否需要付费'),
            'chapter_istxt' => Yii::t('app', '2为入库，1为是txt文件'),
            'chapter_order' => Yii::t('app', '排序'),
            'chapter_create_time' => Yii::t('app', '创建时间'),
            'chapter_update_time' => Yii::t('app', '修改时间'),
        ];
    }
}
